<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class RemoveColumnResolutionIdToVserialisTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('vserialis', function (Blueprint $table) {
            if (Schema::hasColumn('vserialis', 'resolution_id')) {
                $table->dropForeign('vserialis_resolution_id_foreign');
                $table->dropColumn('resolution_id');
            }
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        // Schema::table('vserialis', function (Blueprint $table) {
        //     $table->integer('resolution_id');
        // });
    }
}
